/*
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-05-18 10:28:56
 * @LastEditors: voanit
 * @LastEditTime: 2022-05-18 10:30:51
 */
import { useSelector, useDispatch } from 'react-redux'
import {useEffect}  from  'react'
import { actionChannels } from '@/store/actions/channels'

 export  const useChannels=()=>{
    const channels = useSelector((state) => state.channels)
    const dispatch = useDispatch()
    useEffect(() => {
      dispatch(actionChannels)
    }, [dispatch])

    return channels
  }